<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head>
  <meta name="copyright" content=
  "Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
  <title>Modifying the Ant classpath</title>
  <meta name="keyword" content="ant">
  <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"></script>
</head>
<body>
  <h1>Modifying the Ant classpath</h1>
  <p>When using an optional or custom task it is usually necessary to add extra libraries to the classpath. The Ant
  classpath can be modified globally or per launch configuration.</p>
  <p>To modify the Ant classpath globally:</p>
  <ol>
    <li>Open the <a class="command-link" href=
    'javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ant.ui.AntRuntimePreferencePage)")'>
    <img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <b>Ant &gt; Runtime</b></a>
    preference page.</li>
    <li>If you are not on it already, click the <b>Classpath</b> tab.<br>
    <br>
    <img src="../images/ant_runtime_classpath.png" alt="Ant runtime classpath global preferences" border="0"></li>
    <li>To add a JAR file to the classpath, click <b>Add Jar</b> and select the JAR file.</li>
    <li>To add a folder to the classpath, click <b>Add Folder</b> and select the folder.</li>
    <li>To remove an item from the classpath, select it and click <b>Remove</b>.</li>
    <li>To restore the classpath to the default, click <b>Restore Defaults</b>.</li>
  </ol>
  <p>To modify the Ant classpath for a launch configuration:</p>
  <ol>
    <li>Click <a class="command-link" href=
    'javascript:executeCommand("org.eclipse.ui.externalTools.commands.OpenExternalToolsConfigurations")'><img src=
    "PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <b>Run &gt; External Tools &gt; External
    Tools...</b></a>.</li>
    <li>Select the Ant configuration whose classpath you wish to modify</li>
    <li>Select the <b>Classpath</b> tab<br>
    <br>
    <img src="../images/ant_classpath_tab.png" alt="Ant launch configuration classpath tab" border="0"></li>
    <li>To add a JAR file to the classpath, click <b>Add Jar</b> and select the JAR file.</li>
    <li>To add a folder to the classpath, click <b>Add Folder</b> and select the folder.</li>
    <li>To remove an item from the classpath, select it and click <b>Remove</b>.</li>
  </ol>
  <h3 class="related">Related concepts</h3><a href="../concepts/concepts-antsupport.htm">Ant support</a><br>
  <a href="../concepts/concepts-exttools.htm">External tools</a>
  <h3 class="related">Related tasks</h3><a href="./tasks-ant-running.htm">Running Ant buildfiles</a><br>
  <a href="../tasks/tasks-exttools-running.htm">Running external tools</a>
</body>
</html>
